package cn.yangliu;

import cn.yangliu.tools.AppHandler;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * the type of serial-port-tool
 *
 * <p>
 * .
 *
 * @author 杨柳
 * @date 2024-06-03
 */
@Component
public class BootStrap implements CommandLineRunner {

    @Value("${devtool.enable:false}")
    private boolean devToolEnable;

    @Value("${server.port:8080}")
    private int port;

    @Override
    public void run(String... args) throws Exception {
        AppHandler.startUI(devToolEnable, "127.0.0.1:" + port);
    }
}
